﻿using System;
using System.Collections.Generic;
using System.Text;
using SHJunketingModel;
using SHJunketingDAL;
namespace SHJunketingBLL
{
    public class C_PermissionManage
    {
        /// <summary>
        /// 获取所有权限  王接龙
        /// </summary>
        /// <returns></returns>
        public static IList<C_Permission> GetAllC_Permissions()
        {
            return C_PermissionService.GetAllC_Permissions();
        }
        /// <summary>
        /// 删除操作  王接龙
        /// </summary>
        /// <param name="permissionsID">权限ID</param>
        public static void DeleteC_PermissionByPermissionsID(int permissionsID)
        {
            C_PermissionService.DeleteC_PermissionByPermissionsID(permissionsID);
        }
        /// <summary>
        /// 修改操作 王接龙
        /// </summary>
        /// <param name="cp">权限实体类</param>
        public static Boolean ModifyC_Permission(C_Permission cp)
        {
            int re = C_PermissionService.ModifyC_Permission(cp);
            if (re >0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 查询对象  王接龙
        /// </summary>
        /// <param name="id">权限名称</param>
        /// <returns></returns>
        public static C_Permission GetC_PermissionByPermissionsID(int id)
        {
            return C_PermissionService.GetC_PermissionByPermissionsID(id);
        }
        /// <summary>
        /// 添加操作 王接龙
        /// </summary>
        /// <param name="cp">权限实体类</param>
        public static Boolean AddC_Permissions(C_Permission cp)
        {
            int re = C_PermissionService.AddC_Permissions(cp);
            if (re >0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 查询是否存在 王接龙
        /// </summary>
        /// <param name="asName">权限名称</param>
        /// <returns></returns>
        public static C_Permission GetName(string asName)
        {
            return C_PermissionService.GetName(asName);    
        }
    }
}
